Frequency calibration apparatus and method

ABSTRACT

A frequency calibration apparatus and method are provided. An oscillator of the frequency calibration apparatus has an operation frequency. The frequency calibration apparatus receives a plurality of time packets from an NTP server at a plurality of first time points. Each of the time packets records a second time point that the NTP server transmits the time packet. The frequency calibration apparatus calculates an offset for each of the time packets in a subset of all the time packets, calculates a clock skew according to the first time points and the offsets of the time packets in the subset, calculates a difference between the clock skew and a standard frequency value, determines that an absolute value of the difference is greater than a threshold, and adjusts the operation frequency to an initial frequency after determining that the absolute value of the difference is greater than the threshold.

PRIORITY

This application claims priority to Taiwan Patent Application No.105103111 filed on Feb. 1, 2016, which is hereby incorporated byreference in its entirety.

FIELD

The present invention relates to a frequency calibration apparatus and afrequency calibration method. More particularly, the present inventionrelates to a frequency calibration apparatus and a frequency calibrationmethod that uses the Network Time Protocol (NTP).

BACKGROUND

With the development of technologies, the operations of many equipmentand apparatuses, such as small cells, require the use of an oscillator.However, after these equipment and apparatuses have been used for aperiod of time, the change of the external environment (e.g., thetemperature and the humidity) or the aging of hardware tends to cause anoffset of the operation frequency of the oscillator thereof. When theoffset of the operation frequency of the oscillator becomes too large,the equipment and apparatuses may not be able to operate normally. Forexample, when the small cell is synchronous with other apparatuses, theclock precision that needs to be provided by its oscillator is 50-250parts per billion (ppb). In this case, if the oscillator of the smallcell cannot provide the clock precision ranging between 50 ppb and 250ppb, some operations cannot be performed normally by the small cell,e.g., the handover operation.

Currently, some conventional technologies are available forsynchronization between apparatuses. Most of the conventionaltechnologies are for time synchronization, e.g., the Network TimeProtocol (NTP), the Precision Time synchronization Protocol (PTP), andthe Global Positioning System (GPS). The Synchronous Ethernet (SyncE)among conventional technologies is for frequency synchronization.Additional hardware needs to be provided when the frequencysynchronization is achieved by adopting the PTP and the GPS forcalculation or by directly using the SyncE. However, the hardware isvery expensive, so it represents a great burden for users. Moreover, theuse of the GPS is impossible in indoor environments.

Accordingly, it is important to find a technique to calibrate the offsetof the operation frequency at a low cost.

SUMMARY

The disclosure includes a frequency calibration apparatus whichcomprises an oscillator, a transceiver, and a processor. The processoris electrically connected to the oscillator and the transceiver. Theoscillator has an operation frequency. The transceiver receives aplurality of time packets from a Network Time Protocol (NTP) server at aplurality of first time points. Each of the time packets records asecond time point that the NTP server transmits the time packet. Theprocessor executes the following operation for a subset of the timepackets: subtracting the first time point from the second time point toobtain an offset for each of the time packets included in the subset.The processor further calculates a clock skew according to the firsttime points and the offsets of the time packets included in the subset.The processor further calculates a difference between the clock skew anda standard frequency value. The processor further determines that anabsolute value of the difference is greater than a threshold and adjuststhe operation frequency to an initial frequency after determining thatthe absolute value of the difference is greater than the threshold.

The disclosure also includes a frequency calibration method for anelectronic apparatus. The electronic apparatus comprises an oscillator,which has an operation frequency. The frequency calibration methodcomprises the following steps: (a) receiving a plurality of time packetsfrom an NTP server at a plurality of first time points, wherein each ofthe time packets records a second time point that the NTP servertransmits the time packet, (b) executing the following operation for asubset of the time packets: subtracting the first time point from thesecond time point to obtain an offset for each of the time packetsincluded in the subset, (c) calculating a clock skew according to thefirst time points and the offsets of the time packets included in thesubset, (d) calculating a difference between the clock skew and astandard frequency value, (e) determining that an absolute value of thedifference is greater than a threshold, and (f) adjusting the operationfrequency to an initial frequency after determining that the absolutevalue of the difference is greater than the threshold.

The frequency calibration apparatus and the frequency calibration methodoperate in cooperation with the NTP server, so the operation frequencyof the oscillator comprised in the frequency calibration apparatus iscalibrated timely. Therefore, if an apparatus/equipment (e.g., a smallcell) adopts the technology of the present invention, the possibility ofoperation failure caused by the offset of the operation frequency of theoscillator can be reduced. Moreover, since the cost of the NTP server isrelatively low, the economic burden for the users can also be reduced.

The detailed technology and preferred embodiments implemented for thesubject invention are described in the following paragraphs accompanyingthe appended drawings for people skilled in this field to wellappreciate the features of the claimed invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a schematic view depicting the architecture of a frequencycalibration apparatus 11;

FIG. 1B is a schematic view depicting the signal transmission between atransceiver 113 and a Network Time Protocol (NTP) server 13 of thefrequency calibration apparatus 11;

FIG. 1C is a schematic view depicting the transmission of reference timepackets;

FIG. 2 is a flowchart diagram depicting a frequency calibration method;and

FIG. 3 is a flowchart diagram depicting an initialization process of afrequency calibration method.

DETAILED DESCRIPTION

In the following description, a frequency calibration apparatus and afrequency calibration method according to the present invention will beexplained with reference to example embodiments thereof. However, theseexample embodiments are not intended to limit the present invention toany specific examples, embodiments, environment, applications, orimplementations described in these example embodiments. Therefore, thedescription of these example embodiments is only for the purpose ofillustration rather than to limit the scope of the present invention.

It shall be appreciated that in the following embodiments and theattached drawings, elements unrelated to the present invention areomitted from depiction. Moreover, dimensional relationships amongindividual elements in the attached drawings are illustrated only forease of understanding, but not to limit the actual scale.

The first embodiment of the present invention is a frequency calibrationapparatus 11. A schematic view illustrating the architecture of thefrequency calibration apparatus 11 is depicted in FIG. 1A. The frequencycalibration apparatus 11 comprises an oscillator 111, a transceiver 113,and a processor 115. The processor 115 is electrically connected to theoscillator 111 and the transceiver 113. The oscillator 111 may be aquartz oscillator, an electronic oscillator, or other types ofoscillators known to those of ordinary skill in the art. The transceiver113 may be any interface capable of communicating with a server. Theprocessor 115 may be of any various processors, central processing units(CPUs), microprocessors, or other computing apparatuses known to thoseof ordinary skill in the art.

The oscillator 111 operates at an operation frequency (not shown). Atthe initial stage (e.g., when the frequency calibration apparatus 11 isjust started), the operation frequency of the oscillator 111 is at apreset initial frequency (not shown). With the change of the externalenvironment (e.g., the temperature and the humidity) or the aging ofhardware, an offset of the operation frequency of the oscillator 111 mayoccur (i.e., the operation frequency of the oscillator 111 may becomedifferent from the initial frequency). In this embodiment, the frequencycalibration apparatus 11 operates in cooperation with a Network TimeProtocol (NTP) server 13, so the frequency calibration apparatus 11 canperform calibration timely when the offset of the operation frequency ofthe oscillator 111 occurs. The technique that the frequency calibrationapparatus 11 calibrates the offset of the operation frequency will bedescribed in detail later. Since the oscillator of the frequencycalibration apparatus 11 has an operation frequency and the operationfrequency will be calibrated when an offset thereof is generated, thefrequency calibration apparatus 11 may be integrated into otherequipment and apparatuses requiring the oscillator (e.g., a small cell)to make the equipment and apparatuses can operate normally in someembodiments of the present invention.

The technique that the frequency calibration apparatus 11 calibrates theoperation frequency provided by the oscillator 111 timely will bedescribed now. FIG. 1B is a schematic view depicting the signaltransmission between the transceiver 113 of the frequency calibrationapparatus 11 and the NTP server 13. The NTP server 13 transmits timepackets P1, P2, . . . , PN at the time points S1, S2, . . . , SNrespectively, while the transceiver 113 receives the time packets P1,P2, . . . , PN from the NTP server 13 at the time points R1, R2, . . . ,RN respectively. Each of the time packets P1, P2, . . . , PN records atime point that the NTP server 13 transmits the time packet. Forexample, the time packet P1 records the time point S1, the time packetP2 records the time point S2, and the time packet PN records the timepoint SN.

It shall be appreciated that in some embodiments, the transceiver 113transmits a plurality of request signals to the NTP server 13, whereinthere is a one-to-one correspondence between the request signals and thetime packets P1, P2, . . . , PN. In other words, every time the NTPserver 13 receives one request signal transmitted from the transceiver113, the NTP server 13 transmits one corresponding time packet.Moreover, in some embodiments, the transceiver 113 transmits one requestsignal and the NTP server 13 transmits several time packets afterreceiving the request signal.

Next, the processor 115 of the frequency calibration apparatus 11decides a subset of the time packets P1, P2, . . . , PN. In someembodiments, the subset is a part of the time packets P1, P2, . . . ,PN. In some embodiments, the subset may include all of the time packetsP1, P2, . . . , PN. A concrete example is given herein to elaborate theprocedure that the processor 115 decides the subset; however, thisconcrete example is not intended to limit the scope of the presentinvention. For example, in some embodiments, each of the time packetsP1, P2, . . . , PN corresponds to a Round-Trip Time (RTT). The RTTcorresponding to a time packet refers to the time interval beginningfrom the time point that the transceiver 113 transmits a request signalto the time point that the transceiver 113 receives the time packet. Theprocessor 115 may decide the subset according to the RTTs. For example,in some embodiments, the processor 115 calculates an average time of theRTTs of the time packets P1, P2, . . . , PN and decides the subsetaccording to the average time, e.g., the RTTs of the time packetsincluded in the subset are smaller than the average time. In otherembodiments, the average time of the aforesaid RTTs may also be a medianvalue, a mode value, a geometric mean value, a harmonic mean value, or aquartile value of the RTTs.

Next, for each of the time packets included in the subset, the processor115 of the frequency calibration apparatus 11 subtracts the time pointthat the transceiver 113 receives the time packet from the time pointthat the NTP server 13 transmits the time packet to obtain an offset.For better understanding, it is assumed that the subset includes all ofthe time packets P1, P2, . . . , PN. Under this assumption, theprocessor 115 subtracts the time point R1 from the time point S1 toobtain an offset O1 for the time packet P1, subtracts the time point R2from the time point S2 to obtain an offset O2 for the time packet P2,and subtracts the time point RN from the time point SN to obtain anoffset ON for the time packet PN.

Next, the processor 115 calculates a clock skew according to the timepoints that the NTP server 13 transmits the time packets included in thesubset and the offsets of the time packets included in the subset. Forbetter understanding, it is assumed that the subset includes all of thetime packets P1, P2, . . . , PN. Under this assumption, the processor115 calculates a clock skew according to the time points S1, S2, . . . ,SN and the offsets O1, O2, . . . , ON. In some embodiments, theprocessor 115 may calculate a clock skew according to the time pointsthat the NTP server 13 transmits the time packets included in the subsetand the offsets of the time packets included in the subset through astatistical algorithm. For example, the statistical algorithm may be alinear programming algorithm or a linear regression algorithm.

The technique that the processor 115 calculates a clock skew will befurther detailed by taking the linear programming algorithm as anexample. For ease of understanding, it is assumed that the subsetincludes all of the time packets P1, P2, . . . , PN. The processor 115may regard the time points S1, S2, . . . , SN and the offsets O1, O2, .. . , ON as a plurality of point sets, wherein each of the point setscomprises a time point and the offset corresponding to the time point.For example, the time point S1 and the offset O1 form a point set, thetime point S2 and the offset O2 form a point set, and the time point SNand the offset ON form a point set. The basic concept of adopting thelinear programming algorithm is to obtain an upper bound of the pointsets through the following formula (1).

y=αx+β  (1)

In the aforesaid formula (1), the parameter y represents the offset, theparameter x represents the time point, the parameter α represents theto-be-calculated clock skew, and the parameter β represents theintercept. With regards to the parameter β, the initial value of y is βwhen x equals 0. It is noted that the parameter β does not affect theclock skew (i.e., the parameter α). Therefore, when the clock skew iscalculated according to the linear programming algorithm and the pointsets, each of the point sets needs to satisfy the limitation of thefollowing formula (2).

α·Si+β≧Oi,∀iε{1,2, . . . ,|n|}  (2)

In the aforesaid formula (2), the parameter S_(i) represents the timeinstant in the i^(th) point set, the parameter O_(i) represents theoffset in the i^(th) point set, the parameter n represents the number ofthe point sets, the parameter a represents the to-be-calculated clockskew, and the parameter β represents the intercept. It shall beappreciated that the solution obtained by the processor 115 using thelinear programming algorithm will lead to a minimum value of thefollowing formula (3).

$\begin{matrix}{{\frac{1}{n}{\sum\limits_{i = 1}^{n}{\alpha \cdot {Si}}}} + \beta - {Oi}} & (3)\end{matrix}$

The processor 115 further calculates a difference between the clock skewand a standard frequency value (not shown) after the clock skew iscalculated. It shall be appreciated that the standard frequency valuemay be built in the frequency calibration apparatus 1 or be set in aninitialization process (which will be described in detail hereinafter).Next, the processor 115 compares an absolute value of the differencewith a first threshold (not shown). If the absolute value of thedifference is greater than the first threshold, it means that the offsetof the operation frequency of the oscillator 111 is excessive. Thus, theprocessor 115 adjusts the operation frequency to an initial frequency.If the absolute value of the difference is smaller than the firstthreshold, it means that the offset of the operation frequency of theoscillator 111 is still acceptable. Hence, the processor 115 makes noadjustment to the operation frequency. It is assumed that the standardfrequency value is 12.150 parts per million (which is called “ppm” forshort hereinafter) and the first threshold is 200 parts per billion(which is called “ppb” for short hereinafter). Under such an assumption,if the clock skew is 12.134 ppm, the processor 115 makes no adjustmentto the operation frequency of the oscillator 111 because the absolutevalue (i.e., 16 ppb) of the difference between the clock skew and thefirst threshold is smaller than the first threshold. If the clock skewis 12.354 ppm, the processor 115 adjusts the operation frequency of theoscillator 111 to an initial frequency because the absolute value (i.e.,204 ppb) of the difference between the clock skew and the firstthreshold is greater than the first threshold.

As described above, in some embodiments, the standard frequency valueused by the frequency calibration apparatus 11 may be set in aninitialization process. Two specific examples regarding the calculationof the standard frequency value in an initialization process are givenherein, which, however, are not intended to limit the scope of thepresent invention.

Please refer to FIG. 1C for the first specific example. The NTP server13 transmits the reference time packets Q1, Q2, . . . , QM at thereference time points C1, C2, . . . , CM respectively, while thetransceiver 113 receives the reference time packets Q1, Q2, . . . , QMfrom the NTP server 13 at reference time points D1, D2, . . . , DMrespectively. It shall be appreciated that the reference time points C1,C2, . . . , CM and D1, D2, . . . , DM are earlier than the time pointsS1, S2, . . . , SN and R1, R2, . . . , RN. Each of the reference timepackets Q1, Q2, . . . , QM records the time point that the NTP server 13transmits the reference time packet. For example, the reference timepacket Q1 records the reference time point C1, the reference time packetQ2 records the reference time point C2, and the reference time packet QMrecords the reference time point CM. For each of the reference timepackets Q1, Q2, . . . , QM, the processor 115 subtracts the referencetime point that the transceiver 113 receives the reference time packetfrom the reference time point that the NTP server 13 transmits thereference time packet to obtain a reference offset. For example, forreference time packet Q1, the processor 115 subtracts the reference timepoint D1 from the reference time point C1 to obtain a reference offsetK1; for reference time packet Q2, the processor 115 subtracts thereference time point D2 from the reference time point C2 to obtain areference offset K2; and for reference time packet QM, the processor 115subtracts the reference time point DM from the reference time point CMto obtain a reference offset KM. Next, the processor 115 calculates thestandard frequency value according to the reference time points C1, C2,. . . , CM and the reference offsets K1, K2, . . . , KM. Specifically,the way in which the processor 115 calculates the standard frequencyvalue is the same as the way in which the clock skew is calculated.Based on the descriptions regarding the calculation of the clock skew inthis specification, a person having ordinary skill in the art willunderstand the details regarding the calculation of the standardfrequency value according to the reference time points C1, C2, . . . ,CM and the reference offsets K1, K2, . . . , KM. Therefore, the detailswill not be further described herein.

As an extension of the first specific example, the second specificexample will be described. Specifically, the frequency calibrationapparatus 11 repeatedly calculates the standard frequency value in theway described in the first specific example, repeatedly calculates adifference between two successive standard frequency values, and thendetermines whether two successive differences are smaller than a secondthreshold (not shown). If two successive differences are all smallerthan the second threshold, the processor 115 of the frequencycalibration apparatus 11 determines the final standard frequency valueaccording to the corresponding standard frequency values.

For ease of understanding, it is assumed that the frequency calibrationapparatus 11 sequentially calculates three standard frequency values inthe way described in the first specific example. For ease of subsequentdescription, the three standard frequency values are individually calleda first reference standard frequency value, a second reference standardfrequency value, and a third reference standard frequency value. Thefirst reference standard frequency value precedes the second referencestandard frequency value, while the second reference standard frequencyvalue precedes the third reference standard frequency value. Theprocessor 115 calculates the first difference between the firstreference standard frequency value and the second reference standardfrequency value and then calculates the second difference between thesecond reference standard frequency value and the third referencestandard frequency value. If the processor 115 determines that both thefirst difference and the second difference are smaller than the secondthreshold, the processor 115 further decides the standard frequencyvalue according to the first reference standard frequency value, thesecond reference standard frequency value, and the third referencestandard frequency value. For example, the processor 115 may take themedian of the first reference standard frequency value, the secondreference standard frequency value, and the third reference standardfrequency value as the standard frequency value. As another example, theprocessor 115 may take the average of the first reference standardfrequency value, the second reference standard frequency value, and thethird reference standard frequency value as the standard frequencyvalue.

According to the above descriptions, the frequency calibration apparatus11 operates in cooperation with the NTP server 13, so the operationfrequency of the oscillator 111 comprised in the frequency calibrationapparatus 11 can be calibrated timely. Therefore, when an equipment orapparatus (e.g., a small cell) operates together with the frequencycalibration apparatus 11 or has the frequency calibration apparatus 11built therein, the possibility of operation failure caused by the offsetof the operation frequency of the oscillator 111 can be reduced.Moreover, since the cost of the NTP server 13 is relatively low, theeconomic burden for the users can also be reduced.

The second embodiment of the present invention is a frequencycalibration method and a flowchart diagram of which is depicted in FIG.2. The frequency calibration method is for use in an electronicapparatus (e.g., the frequency calibration apparatus 11 of the firstembodiment). The electronic apparatus comprises an oscillator, whereinthe oscillator has an operation frequency. In the initial operation, theoperation frequency of the oscillator is an initial frequency.

First, step S201 is executed by the electronic apparatus to receive aplurality of time packets from an NTP server at a plurality of firsttime points. It shall be appreciated that each of the time packetsrecords a second time point that the NTP server transmits the timepacket. Next, step S203 is executed by the electronic apparatus tosubtract the first time point from the second time point to obtain anoffset for each of the time packets included in a subset of the timepackets (i.e., all or part of the time packets).

It shall be appreciated that in some embodiments, each of the timepackets corresponds to an RTT. In those embodiments, another step may befurther executed in the frequency calibration method to decide thesubset according to the RTTs. For example, a step may be executed in thefrequency calibration method to calculate an average time of the RTTs.The RTTs of the time packets included in the subset are smaller than theaverage time. In other embodiments, the average time of the aforesaidRTTs may also be a median value, a mode value, a geometric mean value, aharmonic mean value, or a quartile value of the RTTs.

Thereafter, in step S205, a clock skew is calculated by the electronicapparatus according to the first time points and the offsets of the timepackets included in the subset. It shall be appreciated that in someembodiments, step S205 may be executed to calculate the clock skewaccording to the first time points, the offsets, and a statisticalalgorithm. For example, the statistical algorithm may be a linearprogramming algorithm or a linear regression algorithm.

Next, in step S207, a difference between the clock skew and standardfrequency value is calculated by the electronic apparatus. Thereafter,in step S209, it is determined by the electronic apparatus whether theabsolute value of the difference is greater than a first threshold. Ifthe determination result of the step S209 is that the absolute value ofthe difference is greater than the first threshold, step S211 isexecuted to adjust the operation frequency to an initial frequency bythe electronic apparatus. Thereafter, step S201 is executed again toperform assessment in the following stage. If the determination resultof the step S209 is that the absolute value of the difference is notgreater than the first threshold, the operation frequency of theoscillator does not need to be adjusted. Therefore, step S201 isdirectly executed to perform assessment in the following stage.

It shall be appreciated that the initialization process as shown in FIG.3 may be executed before step S201 in some embodiments. Specifically, instep S301, a plurality of reference time packets are received by theelectronic apparatus from the NTP server at a plurality of firstreference time points. It shall be appreciated that each of thereference time packets records a second reference time point that theNTP server transmits the reference time packet. Next, in step S303, thefirst reference time point is subtracted from the second reference timepoint of each of the reference time packets by the electronic apparatusto obtain a reference offset. Since there are a plurality of referencetime packets, a plurality of reference offsets will be obtained.

In step S305, the standard frequency value is calculated by theelectronic apparatus according to the first reference time points andthe reference offsets. Specifically, the way in which the standardfrequency value is calculated in step S305 is the same as the way inwhich the standard frequency value is calculated in step S205. Themethod in which the standard frequency value is calculated in the stepS305 shall be appreciated by those of ordinary skill in the artaccording to the description of the aforesaid step S205 and, thus, willnot be further described herein.

It shall be appreciated that in some embodiments, steps S301 to S305 maybe executed repeatedly in the frequency calibration method to calculateseveral standard frequency values, to repeatedly calculate a differencebetween two successive standard frequency values, and to determinewhether two successive differences are smaller than a second threshold.If two successive differences are all smaller than the second threshold,the final standard frequency value is decided according to thecorresponding standard frequency values in the frequency calibrationmethod.

For ease of understanding, it is assumed that steps S301 to S305 areexecuted repeatedly in the frequency calibration method to sequentiallyobtain three standard frequency values. For ease of subsequentdescription, the three standard frequency values are respectively calledthe first reference standard frequency value, second reference standardfrequency value, and third reference standard frequency value. A step isfurther executed in the frequency calibration method to calculate afirst difference between the first reference standard frequency valueand the second reference standard frequency value. Another step isexecuted to calculate a second difference between the second referencestandard frequency value and the third reference standard frequencyvalue. If it is determined that both the first difference and the seconddifference are smaller than the second threshold, the standard frequencyvalue is further decided according to the first reference standardfrequency value, the second reference standard frequency value and thethird reference standard frequency value.

In addition to the aforesaid steps, the frequency calibration method ofthe second embodiment can also execute all the operations and steps ofthe frequency calibration apparatus 11 set forth in the firstembodiment, have the same functions, and achieve the same technicaleffects as the first embodiment. The technique in which the secondembodiment executes these operations and steps, has the same functions,and achieves the same technical effects as the first embodiment will bereadily appreciated by those of ordinary skill in the art based on theexplanation of the first embodiment. Hence, the details will not befurther described herein.

It shall be appreciated that in the patent specification of the presentinvention, the terms “first” and “second” used in “the first threshold”and “the second threshold” are only intended to distinguish thesethresholds from each other. The terms “first” and “second” used in “thefirst difference” and “the second difference” are only intended todistinguish these differences from each other. The terms “first,”“second,” and “third” used in “the first reference standard frequencyvalue,” “the second reference standard frequency value,” and “the thirdreference standard frequency value” are only intended to distinguishthese reference standard frequency values from each other. The terms“first” and “second” used in “the first time point” and “the second timepoint” are only intended to distinguish these time points from eachother. The terms “first” and “second” used in “the first reference timepoint” and “the second reference time point” are only intended todistinguish these reference time points from each other.

According to the above descriptions, the frequency calibration apparatusand the frequency calibration method according to the present inventionoperate in cooperation with the NTP server, so the operation frequencyof the oscillator comprised in the frequency calibration apparatus iscalibrated timely. Therefore, if an equipment or apparatus (e.g., asmall cell) adopts the technology of the present invention, thepossibility of operation failure caused by the offset of the operationfrequency of the oscillator can be reduced. Moreover, since the cost ofthe NTP server is relatively low, the economic burden for the users canalso be reduced.

The above disclosure is related to the detailed technical contents andinventive features thereof. People skilled in this field may proceedwith a variety of modifications and replacements based on thedisclosures and suggestions of the invention as described withoutdeparting from the characteristics thereof. Nevertheless, although suchmodifications and replacements are not fully disclosed in the abovedescriptions, they have substantially been covered in the followingclaims as appended.

What is claimed is:
 1. A frequency calibration apparatus, comprising: anoscillator, having an operation frequency; a transceiver, beingconfigured to receive a plurality of time packets from a Network TimeProtocol (NTP) server at a plurality of first time points, each of thetime packets recording a second time point that the NTP server transmitsthe time packet; and a processor, being electrically connected to theoscillator and the transceiver and configured to execute the followingoperation for a subset of the time packets: subtracting the first timepoint from the second time point to obtain an offset for each of thetime packets included in the subset; wherein the processor furthercalculates a clock skew according to the first time points and theoffsets of the time packets included in the subset, calculates adifference between the clock skew and a standard frequency value,determines that an absolute value of the difference is greater than afirst threshold, and adjusts the operation frequency to an initialfrequency after determining that the absolute value of the difference isgreater than the first threshold.
 2. The frequency calibration apparatusas claimed in claim 1, wherein the transceiver further receives aplurality of reference time packets from the NTP server at a pluralityof first reference time points, each of the reference time packetsrecords a second reference time point that the NTP server transmits thereference time packet, the processor further subtracts the firstreference time point from the second reference time point to obtain areference offset for each of the reference time packets, and theprocessor further calculates the standard frequency value according tothe first reference time points and the reference offsets.
 3. Thefrequency calibration apparatus as claimed in claim 1, wherein thetransceiver further receives a plurality of first reference time packetsfrom the NTP server at a plurality of first reference time points, eachof the first reference time packets records a second reference timepoint that the NTP server transmits the first reference time packet, theprocessor further subtracts the first reference time point from thesecond reference time point to obtain a first reference offset for eachof the first reference time packets, the processor further calculates afirst reference standard frequency value according to the firstreference time points and the first reference offsets, the transceiverfurther receives a plurality of second reference time packets from theNTP server at a plurality of third reference time points, each of thesecond reference time packets records a fourth reference time point thatthe NTP server transmits the second reference time packet, the processorfurther subtracts the third reference time point from the fourthreference time point to obtain a second reference offset for each of thesecond reference time packets, the processor further calculates a secondreference standard frequency value according to the second referencetime points and the second reference offsets, the transceiver furtherreceives a plurality of third reference time packets from the NTP serverat a plurality of fifth reference time points, each of the thirdreference time packets records a sixth reference time point that the NTPserver transmits the third reference time packet, the processor furthersubtracts the fifth reference time point from the sixth reference timepoint to obtain a third reference offset for each of the third referencetime packets, the processor further calculates a third referencestandard frequency value according to the fifth reference time pointsand the third reference offsets, the processor further calculates afirst difference between the first reference standard frequency valueand the second reference standard frequency value and a seconddifference between the second reference standard frequency value and thethird reference standard frequency value, the processor determines thatboth the first difference and the second difference are smaller than asecond threshold, and the processor further decides the standardfrequency value according to the first reference standard frequencyvalue, the second reference standard frequency value, and the thirdreference standard frequency value.
 4. The frequency calibrationapparatus as claimed in claim 1, wherein the processor calculates theclock skew according to the first time points, the offsets, and astatistical algorithm.
 5. The frequency calibration apparatus as claimedin claim 1, wherein each of the time packets corresponds to a Round-TripTime (RTT) and the processor decides the subset according to the RTTs.6. The frequency calibration apparatus as claimed in claim 1, whereineach of the time packets corresponds to an RTT, the processor calculatesan average time of the RTTs, and the RTTs of the time packets includedin the subset are smaller than the average time.
 7. A frequencycalibration method for an electronic apparatus, the electronic apparatuscomprising an oscillator having an operation frequency, and thefrequency calibration method comprising: (a) receiving a plurality oftime packets from an NTP server at a plurality of first time points,each of the time packets recording a second time point that the NTPserver transmits the time packet; (b) executing the following operationfor a subset of the time packets: subtracting the first time point fromthe second time point to obtain an offset for each of the time packetsincluded in the subset; (c) calculating a clock skew according to thefirst time points and the offsets of the time packets included in thesubset; (d) calculating a difference between the clock skew and astandard frequency value; (e) determining that an absolute value of thedifference is greater than a first threshold; and (f) adjusting theoperation frequency to an initial frequency after determining that theabsolute value of the difference is greater than the first threshold. 8.The frequency calibration method as claimed in claim 7, furthercomprising: receiving a plurality of reference time packets from the NTPserver at a plurality of first reference time points, each of thereference time packets recording a second reference time point that theNTP server transmits the reference time packet; subtracting the firstreference time point from the second reference time point to obtain areference offset for each of the reference time packets; and calculatingthe standard frequency value according to the first reference timepoints and the reference offsets.
 9. The frequency calibration method asclaimed in claim 7, further comprising: receiving a plurality of firstreference time packets from the NTP server at a plurality of firstreference time points, each of the first reference time packetsrecording a second reference time point that the NTP server transmitsthe first reference time packet; subtracting the first reference timepoint from the second reference time point to obtain a first referenceoffset for each of the first reference time packets; calculating a firstreference standard frequency value according to the first reference timepoints and the first reference offsets; receiving a plurality of secondreference time packets from the NTP server at a plurality of thirdreference time points, each of the second reference time packetsrecording a fourth reference time point that the NTP server transmitsthe second reference time packet; subtracting the third reference timepoint from the fourth reference time point to obtain a second referenceoffset for each of the second reference time packets; calculating asecond reference standard frequency value according to the secondreference time points and the second reference offsets; receiving aplurality of third reference time packets from the NTP server at aplurality of fifth reference time points, each of the third referencetime packets recording a sixth reference time point that the NTP servertransmits the third reference time packet; subtracting the fifthreference time point from the sixth reference time point to obtain athird reference offset for each of the third reference time packets;calculating a third reference standard frequency value according to thefifth reference time points and the third reference offsets; calculatinga first difference between the first reference standard frequency valueand the second reference standard frequency value; calculating a seconddifference between the second reference standard frequency value and thethird reference standard frequency value; determining that both thefirst difference and the second difference are smaller than a secondthreshold; and deciding the standard frequency value according to thefirst reference standard frequency value, the second reference standardfrequency value, and the third reference standard frequency value. 10.The frequency calibration method as claimed in claim 7, wherein the stepcalculates the clock skew according to the first time points, theoffsets, and a statistical algorithm.
 11. The frequency calibrationmethod as claimed in claim 7, wherein each of the time packetscorresponds to an RTT and the frequency calibration method furthercomprises: deciding the subset according to the RTTs.
 12. The frequencycalibration method as claimed in claim 7, wherein each of the timepackets corresponds to an RTT and the frequency calibration methodfurther comprises: calculating an average time of the RTTs, wherein theRTTs of the time packets included in the subset are smaller than theaverage time.